/*
 * (C) Copyright 2012, by Tim Xie.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.superapk.diamond.test.entity;

import com.superapk.diamond.sqllite.annotation.DBField;
import com.superapk.diamond.sqllite.annotation.DBTable;

/**
 * 用户创建数据库的类
 * 
 * @author     Tim Xie [tim.xie2008@gmail.com]
 * @date       2013-3-13
 * 
 */

@DBTable(tableName = "dUser") //如果没有设置，默认是小写类名
public class User {
	
	@DBField(generatedId=true)
	private int id; //使用默认名，主键，自动增长
	
	@DBField 
	private String userName; //使用默认名
	
	@DBField(column = "psw") 
	private String password; //使用psw当字段名

	@DBField(defaultValue = "15",unique = true)
	private int age; //没有任何表示，使用默认名

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}
	
}
